export default {
	install(Vue) {
		// 防止重复点击
		Vue.directive("clickReTime", function(el, binding) {
			el.addEventListener("click", () => {
				if (!el.disabled) {
					el.disabled = true;
					setTimeout(() => {
						el.disabled = false;
					}, binding.value || 2000);
				}
			})
		});
		Vue.directive("upperText", function(el, binding) {
			el.textContent = binding.value.toUpperCase();
		});
	},
};
